import { getCurrentInstance } from 'vue';
import { loginStore } from '@/stores/index.ts'
  



export default function(){
	const { proxy } = getCurrentInstance();  
	const state= loginStore();
	console.log(state);
	proxy.$globalMethod();
	const SwitchThemes=(val)=>{
		if(val){
			window.document.documentElement.setAttribute('data-theme', "dark");
		  }else{
			window.document.documentElement.setAttribute('data-theme', "light");
		  }
	}
  const handleSubmit = () => { 
	 state.LOGIN();
  };
  return{
    user:state.user,
    handleSubmit,
	SwitchThemes
  }
}